<template>
  <div class="enterprise-system">
    <div class="system-container">
      <!-- 左侧搜索区域 -->
      <div class="sidebar-search">
        <div class="search-section">
          <div class="input-group">
            <label class="input-label">输入企业名称</label>
            <el-input v-model="enterpriseName" class="enterprise-input" placeholder="请输入企业名称" clearable />
          </div>

          <div class="input-group">
            <el-button type="primary" class="district-btn" @click="showDistrictDialog">
              选择政区划
            </el-button>
          </div>

          <div class="input-group">
            <el-button type="success" class="search-btn" @click="searchEnterprise">
              搜索
            </el-button>
          </div>
        </div>
      </div>

      <!-- 右侧企业信息卡片 -->
      <div class="main-content">
        <div v-if="selectedEnterprise" class="enterprise-card">
          <div class="card-header">
            <h2 class="company-title">{{ selectedEnterprise.name }}</h2>
          </div>

          <div class="card-body">
            <div class="info-section">
              <div class="qr-code-container">
                <div class="qr-code-placeholder">
                  <div class="qr-pattern"></div>
                </div>
              </div>

              <div class="enterprise-details">
                <div class="detail-row">
                  <span class="detail-label">当前设施名称：</span>
                  <span class="detail-value">{{ selectedEnterprise.facilityName }}</span>
                </div>
                <div class="detail-row">
                  <span class="detail-label">企业状态：</span>
                  <span class="detail-value status-normal-text">{{ selectedEnterprise.status }}</span>
                </div>
                <div class="detail-row">
                  <span class="detail-label">活性炭状态：</span>
                  <span class="detail-value">{{ selectedEnterprise.carbonStatus }}</span>
                </div>
                <div class="detail-row">
                  <span class="detail-label">最新更换时间：</span>
                  <span class="detail-value">{{ selectedEnterprise.lastReplaceTime }}</span>
                </div>
                <div class="detail-row">
                  <span class="detail-label">距离更换时间：</span>
                  <span class="detail-value days-remaining">{{ selectedEnterprise.daysToReplace }}天</span>
                </div>
              </div>
            </div>
          </div>

          <div class="card-footer">
            <div class="footer-left">
              <span class="district-tag">{{ selectedEnterprise.district }}</span>
            </div>
            <div class="footer-right">
              <el-button type="primary" class="detail-button" @click="viewDetails">
                详情
              </el-button>
            </div>
          </div>
        </div>

        <!-- 默认状态 -->
        <div v-else class="empty-state">
          <div class="empty-content">
            <div class="empty-icon">🏢</div>
            <p class="empty-text">请输入企业名称进行查询</p>
          </div>
        </div>
      </div>
    </div>

    <!-- 区域选择弹窗 -->
    <el-dialog v-model="districtDialogVisible" title="选择政区划" width="400px">
      <div class="district-list">
        <div v-for="district in districts" :key="district.code" class="district-item"
          :class="{ active: selectedDistrict === district.code }" @click="selectDistrict(district)">
          {{ district.name }}
        </div>
      </div>
      <template #footer>
        <el-button @click="districtDialogVisible = false">取消</el-button>
        <el-button type="primary" @click="confirmDistrict">确定</el-button>
      </template>
    </el-dialog>

    <!-- 详情弹窗 -->
    <el-dialog v-model="detailDialogVisible" title="" width="50%" top="5vh" class="detail-dialog">
      <div class="detail-content">
        <!-- 企业标题 -->
        <div class="detail-header">
          <h2 class="detail-title">{{ detailData.company }}：{{ detailData.facility }}</h2>
        </div>

        <!-- 状态栏 -->
        <div class="status-bar">
          <div class="status-item">
            <span class="status-label">企业状态</span>
            <span class="status-value status-normal-text">{{ detailData.status.enterprise }}</span>
          </div>
          <div class="status-item">
            <span class="status-label">设施预警</span>
            <span class="status-value status-normal-text">{{ detailData.status.facilityAlert }}</span>
          </div>
          <div class="status-item">
            <span class="status-label">距离换碳时间</span>
            <span class="status-value status-warning">{{ detailData.status.carbonDays }}</span>
          </div>
          <div class="status-item">
            <span class="status-label">VOC预警</span>
            <span class="status-value status-danger">{{ detailData.status.vocAlert }}</span>
          </div>
          <div class="status-item">
            <span class="status-label">监控预警</span>
            <span class="status-value status-normal-text">{{ detailData.status.monitorAlert }}</span>
          </div>
        </div>

        <!-- 基本信息表格 -->
        <div class="info-table">
          <div class="table-row">
            <div class="table-cell">
              <span class="cell-label">企业名称：</span>
              <span class="cell-value">{{ detailData.basicInfo.name }}</span>
            </div>
            <div class="table-cell">
              <span class="cell-label">监管机构：</span>
              <span class="cell-value">{{ detailData.basicInfo.supervisor }}</span>
            </div>
          </div>
          <div class="table-row">
            <div class="table-cell">
              <span class="cell-label">企业联系人：</span>
              <span class="cell-value">{{ detailData.basicInfo.contact }}</span>
            </div>
            <div class="table-cell">
              <span class="cell-label">企业联系方式：</span>
              <span class="cell-value">{{ detailData.basicInfo.phone }}</span>
            </div>
          </div>
          <div class="table-row">
            <div class="table-cell">
              <span class="cell-label">安环负责人：</span>
              <span class="cell-value">{{ detailData.basicInfo.envManager }}</span>
            </div>
            <div class="table-cell">
              <span class="cell-label">安环负责手机：</span>
              <span class="cell-value">{{ detailData.basicInfo.envPhone }}</span>
            </div>
          </div>
          <div class="table-row">
            <div class="table-cell">
              <span class="cell-label">社会信用代码：</span>
              <span class="cell-value">{{ detailData.basicInfo.creditCode }}</span>
            </div>
            <div class="table-cell">
              <span class="cell-label">法人：</span>
              <span class="cell-value">{{ detailData.basicInfo.legal }}</span>
            </div>
          </div>
          <div class="table-row">
            <div class="table-cell">
              <span class="cell-label">区域：</span>
              <span class="cell-value">{{ detailData.basicInfo.region }}</span>
            </div>
            <div class="table-cell">
              <span class="cell-label">生产状态：</span>
              <span class="cell-value">{{ detailData.basicInfo.productionStatus }}</span>
            </div>
          </div>
          <div class="table-row full-width">
            <div class="table-cell">
              <span class="cell-label">详细地址：</span>
              <span class="cell-value">{{ detailData.basicInfo.address }}</span>
            </div>
          </div>
          <div class="table-row">
            <div class="table-cell">
              <span class="cell-label">坐标：</span>
              <span class="cell-value">{{ detailData.basicInfo.coordinates }}</span>
            </div>
          </div>
        </div>

        <!-- 标签页 -->
        <div class="tab-bar">
          <div v-for="tab in tabs" :key="tab.key" class="tab-item" :class="{ active: activeTab === tab.key }"
            @click="switchTab(tab.key)">
            {{ tab.label }}
          </div>
        </div>

        <!-- 设施信息内容 -->
        <div v-if="activeTab === 'facility'" class="facility-content">
          <div class="facility-table">
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">所属企业：</span>
                <span class="cell-value">{{ detailData.facilityInfo.company }}</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">二维码编号：</span>
                <span class="cell-value">{{ detailData.facilityInfo.qrCode }}</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">设施名称：</span>
                <span class="cell-value">{{ detailData.facilityInfo.facilityName }}</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">设施内部编号：</span>
                <span class="cell-value">{{ detailData.facilityInfo.internalCode }}</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">废气处理工艺：</span>
                <span class="cell-value">{{ detailData.facilityInfo.wasteProcess }}</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">废气处理设计风量(m³/h)：</span>
                <span class="cell-value">{{ detailData.facilityInfo.designCapacity }}</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">活性炭设计使用量：</span>
                <span class="cell-value">{{ detailData.facilityInfo.designUsage }}</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">更换周期：</span>
                <span class="cell-value">{{ detailData.facilityInfo.replacePeriod }}</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">经纬度：</span>
                <span class="cell-value">{{ detailData.facilityInfo.coordinates }}</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">联系人：</span>
                <span class="cell-value">{{ detailData.facilityInfo.contact }}</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">联系号码：</span>
                <span class="cell-value">{{ detailData.facilityInfo.contactPhone }}</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">活性炭领值：</span>
                <span class="cell-value">{{ detailData.facilityInfo.carbonCapacity }}</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">活性炭实际使用量：</span>
                <span class="cell-value">{{ detailData.facilityInfo.actualUsage }}</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">更换时间：</span>
                <span class="cell-value">{{ detailData.facilityInfo.replaceTime }}</span>
              </div>
            </div>
          </div>

          <!-- 相关照片 -->
          <div class="photos-section" style="padding-bottom: 20px;">
            <h4>相关照片：</h4>
            <div class="photos-grid">
              <div class="photo-item" v-for="i in 3" :key="i">

                <el-image style="flex:1" :src="url" :preview-src-list="srcList" :initial-index="0">
                </el-image>
              </div>
            </div>
          </div>
        </div>

        <!-- 更换记录内容 -->
        <div v-else-if="activeTab === 'records'" class="records-content">
          <div class="facility-table">
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">设施名称：</span>
                <span class="cell-value">整车找补1</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">设施内部编号：</span>
                <span class="cell-value">JMHB-0003</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">更换周期(天)：</span>
                <span class="cell-value">89</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">碳值：</span>
                <span class="cell-value">800</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">活性炭实际使用量：</span>
                <span class="cell-value">0.4</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">更换时间：</span>
                <span class="cell-value">2025-05-13</span>
              </div>
            </div>
          </div>
          <div class="photos-section">
            <h4>更换前照片：</h4>
            <div class="photos-grid">
              <div class="photo-item">
                <el-image style="flex:1" :src="url" :preview-src-list="srcList" :initial-index="0">
                </el-image>
              </div>
              <div class="photo-item">
                <el-image style="flex:1" :src="url" :preview-src-list="srcList" :initial-index="0">
                </el-image>
              </div>
              <div class="photo-item">
                <el-image style="flex:1" :src="url" :preview-src-list="srcList" :initial-index="0">
                </el-image>
              </div>
            </div>
          </div>
          <div class="photos-section" style="border: none;">
            <h4>更换后照片：</h4>
            <div class="photos-grid">
              <div class="photo-item">
                <el-image style="flex:1" :src="url" :preview-src-list="srcList" :initial-index="0">
                </el-image>
              </div>
              <div class="photo-item">
                <el-image style="flex:1" :src="url" :preview-src-list="srcList" :initial-index="0">
                </el-image>
              </div>
              <div class="photo-item">
                <el-image style="flex:1" :src="url" :preview-src-list="srcList" :initial-index="0">
                </el-image>
              </div>
            </div>
            <!-- 更换记录分页按钮 (索引1) -->
            <div class="photo-pagination">
              <span class="page-btn" @click="prevPage">上一页</span>
              <span class="page-num">{{ currentPhotoPage }}</span>
              <span class="page-btn" @click="nextPage">下一页</span>
            </div>
          </div>
        </div>

        <!-- 发票识别内容 -->
        <div v-else-if="activeTab === 'invoices'" class="invoice-content">
          <div class="facility-table">
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">发票代码：</span>
                <span class="cell-value">031001800411</span>
                <span class="status-badge status-normal">正常</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">状态：</span>
                <span class="cell-value">状态</span>
                <span class="status-badge status-normal">正常</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">发票号码：</span>
                <span class="cell-value">28256251</span>
                <span class="status-badge status-normal">正常</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">开票日期：</span>
                <span class="cell-value">2019-07-02</span>
                <span class="status-badge status-error">超出时间范围</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">机器编号：</span>
                <span class="cell-value">661725841577</span>
                <span class="status-badge status-normal">正常</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">销方税号：</span>
                <span class="cell-value">91310120312347740M</span>
                <span class="status-badge status-normal">正常</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">金额：</span>
                <span class="cell-value">84.00</span>
                <span class="status-badge status-error">单价低于市场价格</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">合计金额：</span>
                <span class="cell-value">84.00</span>
                <span class="status-badge status-normal">正常</span>
              </div>
            </div>
            <div class="table-row full-width">
              <div class="table-cell">
                <span class="cell-label">校验码：</span>
                <span class="cell-value">55039 11198 06395 75512</span>
              </div>
            </div>
            <div class="table-row full-width">
              <div class="table-cell">
                <span class="cell-label">二维码：</span>
                <span class="cell-value">01,51,04400160111,75852748,150.00,20170124,73596784452778876142,F333</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">购方名称：</span>
                <span class="cell-value">孟月</span>
                <span class="status-badge status-error">与用碳企业不符</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">销方名称：</span>
                <span class="cell-value">上海一叶子化妆品有限公司</span>
                <span class="status-badge status-normal">正常</span>
              </div>
            </div>
            <div class="table-row full-width">
              <div class="table-cell">
                <span class="cell-label">销方地址、电话：</span>
                <span class="cell-value">上海市青浦区中山北路3300号月星环球港办公楼</span>
              </div>
            </div>
            <div class="table-row full-width">
              <div class="table-cell">
                <span class="cell-label">大写金额：</span>
                <span class="cell-value">捌拾肆圆整</span>
              </div>
            </div>
            <div class="table-row full-width">
              <div class="table-cell">
                <span class="cell-label">销方开户行及账号：</span>
                <span class="cell-value">农行上海陆家嘴支行03377500040013620</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">复核：</span>
                <span class="cell-value">郭占莹</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">开票人：</span>
                <span class="cell-value">石欣</span>
                <span class="status-badge status-normal">正常</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">明细内容：</span>
                <span class="cell-value">美容护肤品</span>
                <span class="status-badge status-error">开票内容非活性炭</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">收款人：</span>
                <span class="cell-value">张明雪</span>
                <span class="status-badge status-normal">正常</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">二维码发票代码：</span>
                <span class="cell-value">031001800411</span>
                <span class="status-badge status-normal">正常</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">二维码发票号码：</span>
                <span class="cell-value">28256251</span>
                <span class="status-badge status-normal">正常</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">发票综合码：</span>
                <span class="cell-value">031001800411</span>
                <span class="status-badge status-normal">正常</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">发票综合号码：</span>
                <span class="cell-value">28256251</span>
                <span class="status-badge status-normal">正常</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">发票类型：</span>
                <span class="cell-value">电子发票</span>
                <span class="status-badge status-normal">正常</span>
              </div>
            </div>
          </div>
          <div class="photos-section" style="border: none;">
            <h4>发票：</h4>
            <div class="photos-grid">
              <div class="photo-item">
                <el-image style="flex:1" :src="url" :preview-src-list="srcList" :initial-index="0">
                </el-image>
              </div>
            </div>
            <!-- 更换记录分页按钮 (索引1) -->
            <div class="photo-pagination">
              <span class="page-btn" @click="prevPage">上一页</span>
              <span class="page-num">{{ currentPhotoPage }}</span>
              <span class="page-btn" @click="nextPage">下一页</span>
            </div>
          </div>
        </div>

        <!-- 报告识别内容 -->
        <div v-else-if="activeTab === 'reports'" class="reports-content">
          <div class="facility-table">
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">报告编号：</span>
                <span class="cell-value">E20230790-3</span>
                <span class="status-badge status-normal">正常</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">样品名称：</span>
                <span class="cell-value">蜂窝活性炭</span>
                <span class="status-badge status-normal">正常</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">委托单位：</span>
                <span class="cell-value">山东新金硕材料股份有限公司</span>
                <span class="status-badge status-normal">正常</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">报告日期：</span>
                <span class="cell-value">2023-07-24</span>
                <span class="status-badge status-error">已过期</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">收样时间：</span>
                <span class="cell-value">2023-07-17</span>
                <span class="status-badge status-error">已过期</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">完成日期：</span>
                <span class="cell-value">2023-07-24</span>
                <span class="status-badge status-error">已过期</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">样品编号：</span>
                <span class="cell-value">600202307730</span>
                <span class="status-badge status-normal">正常</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">检验项目：</span>
                <span class="cell-value">600</span>
                <span class="status-badge status-normal">正常</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">检测企业：</span>
                <span class="cell-value">上海华严检测技术有限公司</span>
                <span class="status-badge status-normal">正常</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">检验检测项目：</span>
                <span class="cell-value">碘吸附值 mg/g</span>
                <span class="status-badge status-normal">正常</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">检验检测结果：</span>
                <span class="cell-value">658</span>
                <span class="status-badge status-normal">正常</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">检测方法：</span>
                <span class="cell-value">GB/T 7702.7-2023</span>
                <span class="status-badge status-normal">正常</span>
              </div>
            </div>
          </div>
          <div class="photos-section" style="border: none;">
            <h4>监测报告：</h4>
            <div class="photos-grid">
              <div class="photo-item">
                <el-image style="flex:1" :src="url" :preview-src-list="srcList" :initial-index="0">
                </el-image>
              </div>
              <div class="photo-item">
                <el-image style="flex:1" :src="url" :preview-src-list="srcList" :initial-index="0">
                </el-image>
              </div>
              <div class="photo-item">
                <el-image style="flex:1" :src="url" :preview-src-list="srcList" :initial-index="0">
                </el-image>
              </div>
              <div class="photo-item">
                <el-image style="flex:1" :src="url" :preview-src-list="srcList" :initial-index="0">
                </el-image>
              </div>
            </div>
            <!-- 更换记录分页按钮 (索引1) -->
            <div class="photo-pagination">
              <span class="page-btn" @click="prevPage">上一页</span>
              <span class="page-num">{{ currentPhotoPage }}</span>
              <span class="page-btn" @click="nextPage">下一页</span>
            </div>
          </div>
        </div>

        <!-- 危废数据内容 -->
        <div v-else-if="activeTab === 'errors'" class="errors-content">
          <div class="facility-table">
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">联单类型：</span>
                <span class="cell-value">废物转移</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">联单编号：</span>
                <span class="cell-value">20233203011622</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">应急联系电话：</span>
                <span class="cell-value">无</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">批准转移决定文号：</span>
                <span class="cell-value">提交状态</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">处置状态：</span>
                <span class="cell-value">处置状态</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">转出企业名称：</span>
                <span class="cell-value">江苏恒久钢构股份有限公司</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">转出企业代码：</span>
                <span class="cell-value">91320301770546400O</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">转出企业联系人：</span>
                <span class="cell-value">马伟</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">转出企业联系电话：</span>
                <span class="cell-value">15105205054</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">转出企业行政区名称：</span>
                <span class="cell-value">江苏省/徐州市/徐州经济技术开发区</span>
              </div>
            </div>
            <div class="table-row full-width">
              <div class="table-cell">
                <span class="cell-label">转出企业地址：</span>
                <span class="cell-value">徐州经济开发区铜山路99号</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">接收企业：</span>
                <span class="cell-value">淮安雅居乐环保服务有限公司</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">接收企业代码：</span>
                <span class="cell-value">91320800MA1XUL2966</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">接收企业联系人：</span>
                <span class="cell-value">韩志</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">接收企业联系电话：</span>
                <span class="cell-value">18961918015</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">接收企业地址：</span>
                <span class="cell-value">江苏省/淮安市/淮安工业园区李消路57号</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">接收企业许可证号：</span>
                <span class="cell-value">IS0829001593-1</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">接收日期：</span>
                <span class="cell-value">2023/6/30 9:16:54</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">是否存在重大差异：</span>
                <span class="cell-value">无</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">接受企业意见：</span>
                <span class="cell-value">无</span>
              </div>
            </div>
            <div class="table-row">
              <div class="table-cell">
                <span class="cell-label">运输企业名称：</span>
                <span class="cell-value">淮安港通物流有限公司</span>
              </div>
              <div class="table-cell">
                <span class="cell-label">运输企业代码：</span>
                <span class="cell-value">无</span>
              </div>
            </div>
          </div>
          <!-- 危废数据分页按钮 (索引5) -->
          <div class="photo-pagination">
            <span class="page-btn" @click="prevPage">上一页</span>
            <span class="page-num">{{ currentPhotoPage }}</span>
            <span class="page-btn" @click="nextPage">下一页</span>
          </div>
        </div>

      </div>
    </el-dialog>
  </div>
</template>

<script setup lang="ts">
import { ref, computed } from 'vue'

// 数据定义
const enterpriseName = ref('')
const selectedEnterprise = ref({
  name: '江苏吉美新能源车业有限公司',
  facilityName: '喷涂001',
  status: '正常',
  carbonStatus: '通明',
  lastReplaceTime: '',
  daysToReplace: '12',
  district: '黄汇区'
})
const url =
  'https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg'
const srcList = [
  'https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg',
  'https://fuss10.elemecdn.com/1/34/19aa98b1fcb2781c4fba33d850549jpeg.jpeg',
  'https://fuss10.elemecdn.com/0/6f/e35ff375812e6b0020b6b4e8f9583jpeg.jpeg',
  'https://fuss10.elemecdn.com/9/bb/e27858e973f5d7d3904835f46abbdjpeg.jpeg',
  'https://fuss10.elemecdn.com/d/e6/c4d93a3805b3ce3f323f7974e6f78jpeg.jpeg',
  'https://fuss10.elemecdn.com/3/28/bbf893f792f03a54408b3b7a7ebf0jpeg.jpeg',
  'https://fuss10.elemecdn.com/2/11/6535bcfb26e4c79b48ddde44f4b6fjpeg.jpeg',
]
// 弹窗控制
const districtDialogVisible = ref(false)
const selectedDistrict = ref('')

// 区域数据
const districts = ref([
  { code: 'gulou', name: '鼓楼区' },
  { code: 'yunlong', name: '云龙区' },
  { code: 'jiawang', name: '贾汪区' },
  { code: 'quanshan', name: '泉山区' },
  { code: 'tongshan', name: '铜山区' },
  { code: 'fengxian', name: '丰县' },
  { code: 'puxian', name: '沛县' },
  { code: 'xunxian', name: '睢宁县' },
  { code: 'xinyi', name: '新沂市' },
  { code: 'pizhou', name: '邳州市' }
])

// 方法定义
const showDistrictDialog = () => {
  districtDialogVisible.value = true
}

const selectDistrict = (district: any) => {
  selectedDistrict.value = district.code
}

const confirmDistrict = () => {
  const district = districts.value.find(d => d.code === selectedDistrict.value)
  if (district) {
    selectedEnterprise.value.district = district.name
  }
  districtDialogVisible.value = false
}

const searchEnterprise = () => {
  if (enterpriseName.value.trim()) {
    // 模拟搜索结果
    selectedEnterprise.value = {
      name: enterpriseName.value || '江苏吉美新能源车业有限公司',
      facilityName: '喷涂001',
      status: '正常',
      carbonStatus: '通明',
      lastReplaceTime: '',
      daysToReplace: '12',
      district: '黄汇区'
    }
  }
}

const viewDetails = () => {
  detailDialogVisible.value = true
}

// 详情弹窗控制
const detailDialogVisible = ref(false)

// 详情页面数据
const detailData = ref({
  company: '江苏吉美新能源车业有限公司',
  facility: '整车找补1',
  status: {
    enterprise: '正常',
    facilityAlert: '正常',
    carbonDays: '12天',
    vocAlert: '去除比较低',
    monitorAlert: '无'
  },
  basicInfo: {
    name: '江苏吉美新能源车业有限公司',
    supervisor: '贾汇区',
    contact: '范海川',
    phone: '13218571314',
    envManager: '唐森',
    envPhone: '18952150620',
    creditCode: '91320305MA1X352J7T',
    legal: '唐守光',
    region: '江苏省徐州市贾汇区',
    productionStatus: '生产',
    address: '江苏省徐州市贾汇区越大道与西经三路交叉口正东方向310米左右',
    coordinates: '34.400948,117.3845'
  },
  facilityInfo: {
    company: '江苏吉美新能源车业有限公司',
    qrCode: '7502980238',
    facilityName: '整车找补1',
    internalCode: 'JMHB-0003',
    wasteProcess: '纤维过滤棉+二级活性炭',
    designCapacity: '28105',
    designUsage: '0.2',
    replacePeriod: '89',
    coordinates: '117.38682,34.39757',
    contact: '未填写',
    contactPhone: '未填写',
    carbonCapacity: '800',
    actualUsage: '0.2',
    replaceTime: '2025-05-13'
  }
})

// 详情页面标签页
const activeTab = ref('facility')
const tabs = [
  { key: 'facility', label: '设施信息' },
  { key: 'records', label: '更换记录(2)' },
  { key: 'reports', label: '报告识别(1)' },
  { key: 'invoices', label: '发票识别(1)' },
  { key: 'monitoring', label: '在线监测' },
  { key: 'errors', label: '危废数据(1)' }
]

// 切换标签页
const switchTab = (tabKey: string) => {
  activeTab.value = tabKey
  if (tabKey === 'monitoring') {
    //打开弹窗
  }
}

// 分页相关
const currentPhotoPage = ref(1)

const prevPage = () => {
  currentPhotoPage.value = currentPhotoPage.value - 1
}

const nextPage = () => {
  currentPhotoPage.value = currentPhotoPage.value + 1

}
</script>

<style scoped>
.enterprise-system {
  width: 100%;
  height: 100vh;
  font-family: 'Microsoft YaHei', Arial, sans-serif;
  overflow: hidden;
  position: relative;
  background: 
    linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #1e3c72 100%),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  background-size: cover, 50px 50px;
}

.enterprise-system::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
  pointer-events: none;
}

.system-container {
  display: flex;
  height: 100%;
  position: relative;
  z-index: 2;
}

/* 左侧搜索区域 */
.sidebar-search {
  width: 340px;
  padding: 0;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(10px);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
}

.search-section {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.input-group {
  width: 100%;
}

.input-label {
  display: block;
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.enterprise-input {
  width: 100%;
}

.enterprise-input :deep(.el-input__wrapper) {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.district-btn,
.search-btn {
  width: 100%;
  height: 44px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s;
}

.district-btn {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #ffffff;
}

.search-btn {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  color: #ffffff;
}

.district-btn:hover,
.search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* 主内容区域 */
.main-content {
  flex: 1;
  background: 
    radial-gradient(circle at center, rgba(255, 255, 255, 0.02) 0%, transparent 70%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.01) 0%, transparent 50%);
  padding: 30px;
  backdrop-filter: blur(5px);
  position: relative;
  overflow: hidden;
}

.main-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 30% 30%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
  animation: floatingLight 8s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 1;
}

@keyframes floatingLight {
  0% {
    transform: translateX(-20px) translateY(-20px) rotate(0deg);
    opacity: 0.3;
  }
  50% {
    transform: translateX(10px) translateY(10px) rotate(180deg);
    opacity: 0.6;
  }
  100% {
    transform: translateX(20px) translateY(20px) rotate(360deg);
    opacity: 0.3;
  }
}

.enterprise-card {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(145deg, #1e40af 0%, #3b82f6 50%, #1e3a8a 100%);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  position: relative;
  z-index: 2;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-header {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.company-title {
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.card-body {
  padding: 25px;
}

.info-section {
  display: flex;
  gap: 25px;
  align-items: flex-start;
}

.qr-code-container {
  flex-shrink: 0;
}

.qr-code-placeholder {
  width: 120px;
  height: 120px;
  background: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.qr-pattern {
  width: 80%;
  height: 80%;
  background:
    repeating-linear-gradient(45deg,
      #000 0px,
      #000 2px,
      transparent 2px,
      transparent 6px),
    repeating-linear-gradient(-45deg,
      #000 0px,
      #000 2px,
      transparent 2px,
      transparent 6px);
  border-radius: 4px;
}

.enterprise-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-row {
  display: flex;
  align-items: center;
  font-size: 14px;
  line-height: 1.5;
}

.detail-label {
  color: rgba(255, 255, 255, 0.8);
  min-width: 120px;
  font-weight: 500;
}

.detail-value {
  color: #ffffff;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.status-normal-text {
  color: #10b981;
  font-weight: 700;
}

.days-remaining {
  color: #fbbf24;
  font-weight: 700;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.district-tag {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  backdrop-filter: blur(5px);
}

.detail-button {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  border: none;
  border-radius: 20px;
  padding: 8px 20px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  transition: all 0.3s;
}

.detail-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.6);
}

/* 空状态 */
.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 400px;
  position: relative;
  z-index: 2;
}

.empty-content {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-text {
  font-size: 16px;
  margin: 0;
}

/* 区域选择弹窗 */
.district-list {
  max-height: 300px;
  overflow-y: auto;
}

.district-item {
  padding: 12px 16px;
  cursor: pointer;
  border-radius: 6px;
  margin: 4px 0;
  transition: all 0.3s;
  color: var(--el-text-color-primary);
}

.district-item:hover {
  background: var(--el-color-primary-light-9);
}

.district-item.active {
  background: var(--el-color-primary);
  color: #ffffff;
}

/* 详情弹窗 */
.detail-dialog {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
}

.detail-dialog :deep(.el-dialog__body) {
  padding: 0;
}

.detail-content {
  background:
    linear-gradient(145deg, #0f172a 0%, #1e293b 50%, #334155 100%),
    radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
  color: #ffffff;
  min-height: 500px;
  padding: 0;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.detail-header {
  background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
  padding: 15px;
  text-align: center;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.detail-title {
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.status-bar {
  display: flex;
  justify-content: space-around;
  background:
    linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
  padding: 15px;
  border-bottom: 2px solid rgba(6, 182, 212, 0.3);
  position: relative;
  overflow: hidden;
}

.status-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    repeating-linear-gradient(45deg,
      transparent,
      transparent 2px,
      rgba(6, 182, 212, 0.03) 2px,
      rgba(6, 182, 212, 0.03) 4px);
  pointer-events: none;
}

.status-item {
  text-align: center;
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(6, 182, 212, 0.2);
  margin: 0 4px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.status-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.2), transparent);
  transition: left 0.5s ease;
}

.status-item:hover::before {
  left: 100%;
}

.status-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.3);
  border-color: rgba(6, 182, 212, 0.5);
}

.status-label {
  display: block;
  font-size: 11px;
  color: #06b6d4;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  text-shadow: 0 0 6px rgba(6, 182, 212, 0.5);
}

.status-value {
  font-weight: 700;
  font-size: 14px;
  position: relative;
  z-index: 1;
}

.status-normal {
  color: #10b981;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.status-warning {
  color: #f59e0b;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.status-danger {
  color: #ef4444;
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

.info-table,
.facility-table {
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
  border: 1px solid rgba(59, 130, 246, 0.3);
  /* border-radius: 12px; */
  box-shadow:
    0 0 20px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.info-table::before,
.facility-table::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #60a5fa, transparent);
  animation: scanLine 3s linear infinite;
}

@keyframes scanLine {
  0% {
    left: -100%;
  }

  100% {
    left: 100%;
  }
}

.table-row {
  display: flex;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(6, 182, 212, 0.3);
  padding: 12px 0;
  position: relative;
  transition: all 0.3s ease;
}

.table-row:hover {
  background: rgba(59, 130, 246, 0.1);
  border-bottom-color: rgba(6, 182, 212, 0.6);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
  transform: translateX(4px);
}

.table-row.full-width {
  flex-direction: column;
}

.table-cell {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 44px;
  position: relative;
  flex-wrap: wrap;
  gap: 8px;
}

.cell-label {
  color: #06b6d4;
  font-weight: 600;
  min-width: 120px;
  font-size: 13px;
  text-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
  position: relative;
}

/* .cell-label::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, #06b6d4, #3b82f6);
  transition: width 0.3s ease;
} */

.table-row:hover .cell-label::after {
  width: 100%;
}

.cell-value {
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  /* border-left: 2px solid #60a5fa; */
  backdrop-filter: blur(5px);
}

.tab-bar {
  display: flex;
  background:
    linear-gradient(135deg, rgba(6, 182, 212, 0.08) 0%, rgba(59, 130, 246, 0.08) 100%);
  border-bottom: 2px solid rgba(6, 182, 212, 0.3);
  position: relative;
  overflow: hidden;
}

.tab-bar::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #06b6d4, #3b82f6, #8b5cf6, transparent);
  animation: flowLight 4s ease-in-out infinite;
}

@keyframes flowLight {

  0%,
  100% {
    opacity: 0.3;
  }

  50% {
    opacity: 1;
  }
}

.tab-item {
  flex: 1;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  font-weight: 600;
  color: rgba(6, 182, 212, 0.8);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 3px solid transparent;
  font-size: 14px;
  position: relative;
  background: transparent;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  overflow: hidden;
}

.tab-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.1), transparent);
  transition: left 0.6s ease;
}

.tab-item:hover::before {
  left: 100%;
}

.tab-item:hover {
  color: #06b6d4;
  background: rgba(6, 182, 212, 0.1);
  text-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
  transform: translateY(-2px);
}

.tab-item.active {
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(6, 182, 212, 0.2) 0%, rgba(59, 130, 246, 0.2) 100%);
  border-bottom-color: #06b6d4;
  text-shadow: 0 0 12px rgba(6, 182, 212, 0.8);
  box-shadow:
    0 0 20px rgba(6, 182, 212, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.tab-item.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #06b6d4, transparent);
  box-shadow: 0 0 8px #06b6d4;
}

.facility-content {
  background: rgba(255, 255, 255, 0.02);
}

.photos-section {
  padding: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0;
}

.photos-section h4 {
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

.photos-grid {
  display: flex;
  gap: 10px;
}

.photo-item {
  flex: 1;
  max-width: 150px;
  display: flex;
}

.photo-placeholder {
  background: rgba(255, 255, 255, 0.1);
  border: 2px dashed rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

.photo-pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  align-items: center;
  padding: 20px 0;
}

.page-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
}

.page-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.page-num {
  color: #60a5fa;
  font-weight: 700;
  font-size: 16px;
}

.other-content {
  padding: 40px;
  text-align: center;
}

.empty-content p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
}

/* 新标签页内容样式 */
.records-content,
.invoice-content,
.errors-content,
.reports-content {
  background: rgba(255, 255, 255, 0.02);
}

.page-btn {
  background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid rgba(6, 182, 212, 0.3);
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.page-btn:hover {
  background: linear-gradient(135deg, #0891b2 0%, #2563eb 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
}

.page-num {
  color: #06b6d4;
  font-weight: 700;
  font-size: 16px;
  text-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
  padding: 8px 12px;
  background: rgba(6, 182, 212, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

/* 状态标签样式 */
.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  margin-left: 8px;
  min-width: 50px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.status-normal {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  color: #ffffff;
  border-color: rgba(16, 185, 129, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.status-error {
  background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
  color: #ffffff;
  border-color: rgba(239, 68, 68, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  animation: errorPulse 2s infinite;
}

@keyframes errorPulse {

  0%,
  100% {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(239, 68, 68, 0.7);
  }

  50% {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 0 4px rgba(239, 68, 68, 0);
  }
}

.status-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .system-container {
    flex-direction: column;
  }

  .sidebar-search {
    width: 100%;
    height: auto;
  }

  .search-section {
    flex-direction: row;
    gap: 10px;
    flex-wrap: wrap;
  }

  .input-group {
    flex: 1;
    min-width: 200px;
  }

  .info-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
</style>
